//
// Created by Arikes on 9/20/21.
//

#ifndef DESIGNERMODE_OBJECTADAPTER_H
#define DESIGNERMODE_OBJECTADAPTER_H

#include "Target.h"
#include "Adaptee.h"
namespace AdapterMode {
    class ObjectAdapter:public Target{
    public:
        ObjectAdapter(Adaptee* adaptee)
        {
            _adaptee = adaptee;
        }

        void request()
        {
            if(nullptr != _adaptee)
                _adaptee->specificRequest();
        }
    private:
        Adaptee* _adaptee = nullptr;
    };
}

//AdapterMode::Adaptee *adaptee = new AdapterMode::Adaptee();
//AdapterMode::Target *target = new AdapterMode::ObjectAdapter(adaptee);
//target->request();

#endif //DESIGNERMODE_OBJECTADAPTER_H
